package com.tfd.blog.exception;

/**
 * @author TangFD@HF 2019/5/8
 */
public class BlogException extends RuntimeException {

    private BlogExceptionCode exceptionCode;

    public BlogException() {
        super();
    }

    public BlogException(String message) {
        super(message);
    }

    public BlogException(BlogExceptionCode exceptionCode, String message) {
        this(exceptionCode, message, null);
    }

    public BlogException(BlogExceptionCode exceptionCode, String message, Throwable cause) {
        super(exceptionCode + message, cause);
        this.exceptionCode = exceptionCode;
    }

    public BlogException(BlogExceptionCode exceptionCode, Throwable cause) {
        this(exceptionCode, "", cause);
    }

    public BlogException(String message, Throwable cause) {
        super(message, cause);
    }

    public BlogException(Throwable cause) {
        super(cause);
    }
}
